import {
  createStore,
  applyMiddleware,
  combineReducers
} from 'redux';

import countReducer from './reducer/countReducer';
import movieReducer from "./reducer/movieReducer"

import thunk from 'redux-thunk';

const allReducer = combineReducers({
  count: countReducer,
  movie: movieReducer
})

//创建一个store对象 需要使用redux提供的createStore方法 并且传入reducer和当前的store做关联
const store = createStore(allReducer, applyMiddleware(thunk));

//把store对象暴露出去
export default store;